//
//
//  Created by longma on 2018/7/31.
//  Copyright © 2018年 XLH. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface WCBDHelper : NSObject

typedef void (^WCBDArraySuccessBlock)(NSArray *array);


+ (instancetype)shared;

@property (nonatomic, assign) BOOL isNeedUpdateHealthData;

@property (nonatomic, assign) BOOL isNeedUpdatePatientData;

@property (nonatomic, assign) BOOL isNeedUpdateMultipleData;

@property (nonatomic, assign) BOOL isNeedUpdateGoutData;

@property (nonatomic, assign) BOOL isNeedUpdateHemoglobinData;

@property (nonatomic, assign) BOOL isBloodSugarUpdated;

@property (nonatomic, assign) BOOL isTotalCholesterolUpdated;

+ (PatientModel *)mj_insertObjectWithPatient:(PatientModel *)patientModel;

/// 初始化成员数据
- (void)mj_initPatientArray;

- (void)initHealthData;

- (void)removeFiles;

#pragma mark - 成员

/// 搜索成员
/// - Parameter srarchString: srarchString description
+ (NSMutableArray *)mj_getPatientArrayWithSearchString:(NSString *)srarchString;

#pragma mark - Gout

/// 请求痛风数据
/// - Parameters:
///   - showLoading: <#showLoading description#>
///   - dataArrayBlock: <#dataArrayBlock description#>
- (void)requestGoutListDataWithLoading:(BOOL)showLoading dataArrayBlock:(WCBDArraySuccessBlock)dataArrayBlock;

/// 获取痛风数据
/// - Parameter parm:
- (NSArray *)mj_getGoutArrayWithParm:(MJCommonModel *)parm;

/// 插入痛风数据
/// - Parameter model: <#model description#>
- (void)mj_insertGoutObjectWithModel:(MJGoutDetectionModel *)model;

/// 上传本地痛风数据
/// - Parameter parm:
- (void)mj_uploadLocalGoutArray;

#pragma mark - Hemoglobin

/// 血红蛋白数据
/// - Parameters:
///   - showLoading: <#showLoading description#>
///   - dataArrayBlock: <#dataArrayBlock description#>
- (void)requestHemoglobinListDataWithLoading:(BOOL)showLoading dataArrayBlock:(WCBDArraySuccessBlock)dataArrayBlock;

/// 获取血红蛋白数据
/// - Parameter patientId: <#patientId description#>
- (NSArray *)mj_getHemoglobinArrayWithParm:(MJCommonModel *)parm;

/// 插入血红蛋白数据
/// - Parameter model: <#model description#>
- (void)mj_insertHemoglobinObjectWithModel:(MJHemoglobinModel *)model;

#pragma mark - Multiple

/// 4合1数据
/// - Parameters:
///   - showLoading: <#showLoading description#>
///   - dataArrayBlock: <#dataArrayBlock description#>
- (void)requestMultipleListDataWithLoading:(BOOL)showLoading dataArrayBlock:(WCBDArraySuccessBlock)dataArrayBlock;

/// 获取4合1数据
/// - Parameter patientId: <#patientId description#>
- (NSArray *)mj_getMultipleArrayWithParm:(MJCommonModel *)parm;

/// 插入4合1数据
/// - Parameter model: <#model description#>
- (void)mj_insertMultipleObjectWithModel:(MJMultipleModel *)model;

/// <#Description#>
/// - Parameter detectionId: <#detectionId description#>
- (MJMultipleModel *)mj_getMultipleObjectWithDetectionId:(NSString *)detectionId;

#pragma mark - 血糖

/// 血糖数据
/// - Parameters:
///   - showLoading: <#showLoading description#>
///   - dataArrayBlock: <#dataArrayBlock description#>
- (void)requestBloodSugarListDataWithLoading:(BOOL)showLoading dataArrayBlock:(WCBDArraySuccessBlock)dataArrayBlock;

/// 获取血糖数据
/// - Parameter patientId: <#patientId description#>
- (NSArray *)mj_getBloodSugarArrayWithParm:(MJCommonModel *)parm;

/// 插入血糖数据
/// - Parameter model: <#model description#>
- (void)mj_insertBloodSugarObjectWithModel:(MJBloodSugarModel *)model;

#pragma mark - 总胆固醇

/// 总胆固醇数据
/// - Parameters:
///   - showLoading: <#showLoading description#>
///   - dataArrayBlock: dataArrayBlock description
- (void)requestTotalCholesterolListDataWithLoading:(BOOL)showLoading dataArrayBlock:(WCBDArraySuccessBlock)dataArrayBlock;

/// 获取总胆固醇数据
/// - Parameter patientId: <#patientId description#>
- (NSArray *)mj_getTotalCholesterolArrayWithParm:(MJCommonModel *)parm;

/// 插入总胆固醇数据
/// - Parameter model: <#model description#>
- (void)mj_insertTotalCholesterolObjectWithModel:(MJTotalCholesterolModel *)model;
@end
